import request from '@/utils/request'

// 查询调度记录基本信息列表
export function listDispatch(query) {
  return request({
    url: '/manager/dispatch/list',
    method: 'get',
    params: query
  })
}

// 查询调度记录基本信息详细
export function getDispatch(dispatchid) {
  return request({
    url: '/manager/dispatch/' + dispatchid,
    method: 'get'
  })
}

// 新增调度记录基本信息
export function addDispatch(data) {
  return request({
    url: '/manager/dispatch',
    method: 'post',
    data: data
  })
}

// 修改调度记录基本信息
export function updateDispatch(data) {
  return request({
    url: '/manager/dispatch',
    method: 'put',
    data: data
  })
}

// 删除调度记录基本信息
export function delDispatch(dispatchid) {
  return request({
    url: '/manager/dispatch/' + dispatchid,
    method: 'delete'
  })
}

// 导出调度记录基本信息
export function exportDispatch(query) {
  return request({
    url: '/manager/dispatch/export',
    method: 'get',
    params: query
  })
}

// 取消调度派车
export function cancleDispatch(data) {
  return request({
    url: '/manager/dispatch/cancel',
    method: 'post',
    data: data
  })
}
